<?php
namespace App\Model;

use Illuminate\Database\Eloquent\Model;

/**
 * User: HuangYin
 * Date: 2017-01-12 19:44
 *
 * Description:
 */
class BaseModel extends Model
{
    /**
     * 格式化时间
     *
     * @param \DateTime|int $value
     * @return false|int
     */
    public function fromDateTime($value)
    {
        return strtotime(parent::fromDateTime($value));
    }
}